<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>计算属性</title>
</head>
<body>
  <div id="app">
    {{name}}
  </div>
  <script src="vue.js"></script>
  <script>
    const vm = new Vue({
      el:"#app",
      data:{
        first_name:"张",
        last_name:"三"
      },
      computed:{
        name() {
          return this.first_name+this.last_name
        }
      }
    })
  </script>
</body>
</html>